1. Technical Field
This invention generally relates to computer systems. More specifically, this invention relates to identifying stack frames corresponding to called methods in object oriented systems.
2. Background Art
Since the dawn of the computer age, computer systems have evolved into extremely sophisticated devices, and computer systems may be found in many different settings. Computer systems typically include a combination of hardware, such as semiconductors and circuit boards, and software, also known as computer programs. As advances in semiconductor processing and computer architecture push the performance of the computer hardware higher, more sophisticated computer software has evolved to take advantage of the higher performance of the hardware, resulting in computer systems today that are much more powerful than just a few years ago.
Computer systems typically include operating system software that controls the basic function of the computer, and one or more software application programs that run under the control of the operating system to perform desired tasks. For example, a typical IBM Personal Computer may run a Microsoft Windows operating system, and under the control of the operating system, a user may execute an application program, such as a word processor. As the capabilities of computer systems have increased, the application software programs designed for high performance computer systems have become extremely powerful. Additionally, software development costs have continued to rise because more powerful and complex programs take more time, and hence more money, to produce.
One way in which the performance of application software programs has been improved while the associated development costs have been reduced is by using object oriented programming concepts. The goal of using object oriented programming is to create small, reusable sections of program code known as “objects” that can be quickly and easily combined and re-used to create new programs. This is similar to the idea of using the same set of building blocks again and again to create many different structures. The modular and re-usable aspects of objects will typically speed development of new programs, thereby reducing the costs associated with the development cycle. In addition, by creating and re-using a comprehensive set of well-tested objects, a more stable, uniform, and consistent approach to developing new computer programs can be achieved.
The Java programming language developed by Sun Microsystems is one modern object oriented programming language that has become very popular in recent years. Java creates one or more invocation stacks at run-time that are used to store information when a method is called (or invoked). When a method is invoked, a new stack frame is typically allocated that contains information for the called method. Java includes several classes that contain methods which require exact information to be gathered about the current invocation stack.
One thing that can complicate or even preclude the gathering of exact information about the current invocation stack is the inlining of methods. In some circumstances code can be optimized by incorporating (or inlining) code from one method into another method. By inlining a method into another method, only one invocation stack frame exists where there would normally be two, one of each method. As a result, inlining has been generally viewed as being incompatible with gathering exact information about the current invocation stack. To be fully compatible with Java, the capability of gathering exact information about the current invocation stack is an absolute necessity. As a result, computer system manufacturers are faced with the dilemma of either enabling inlining to optimize code at the expense of full compatibility with Java, or disabling inlining to assure full compatibility with Java. Without a way to provide exact invocation stack information when one of more stack frames include inlined methods, the computer industry will continue to suffer from Java-compliant code that cannot benefit from inlining of methods, or non-compliant code that benefits from the inlining of methods.